<!DOCTYPE html>
<!--[if IE 9]>         <html class="no-js lt-ie10" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
    <meta charset="utf-8">

    <title>BDS-外卖UI|登陆</title>

    <meta name="description" content="ProUI Frontend is a Responsive Bootstrap Site Template created by pixelcave and added as a bonus in ProUI Admin Template package which is published on Themeforest.">
    <meta name="author" content="pixelcave">
    <meta name="robots" content="noindex, nofollow">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0">

    <!-- Icons -->
    <!-- The following icons can be replaced with your own, they are used by desktop and mobile browsers -->
    <link rel="shortcut icon" href="img/favicon.png">
    <link rel="apple-touch-icon" href="img/icon57.png" sizes="57x57">
    <link rel="apple-touch-icon" href="img/icon72.png" sizes="72x72">
    <link rel="apple-touch-icon" href="img/icon76.png" sizes="76x76">
    <link rel="apple-touch-icon" href="img/icon114.png" sizes="114x114">
    <link rel="apple-touch-icon" href="img/icon120.png" sizes="120x120">
    <link rel="apple-touch-icon" href="img/icon144.png" sizes="144x144">
    <link rel="apple-touch-icon" href="img/icon152.png" sizes="152x152">
    <link rel="apple-touch-icon" href="img/icon180.png" sizes="180x180">
    <!-- END Icons -->

    <!-- Stylesheets -->
    <!-- Bootstrap is included in its original form, unaltered -->
    <link rel="stylesheet" href="/portal/css/bootstrap.min.css">

    <!-- Related styles of various icon packs and plugins -->
    <link rel="stylesheet" href="/portal/css/plugins.css">

    <!-- The main stylesheet of this template. All Bootstrap overwrites are defined in here -->
    <link rel="stylesheet" href="/portal/css/main.css">

    <!-- The themes stylesheet of this template (for using specific theme color in individual elements - must included last) -->
    <link rel="stylesheet" href="/portal/css/themes.css">
    <!-- END Stylesheets -->

    <!-- Modernizr (browser feature detection library) -->
    <script src="/portal/js/vendor/modernizr.min.js"></script>
</head>
<body>
<!-- Page Container -->
<!-- In the PHP version you can set the following options from inc/config file -->
<!-- 'boxed' class for a boxed layout -->
<div id="page-container">
    <!-- Site Header -->
    <header>
        <div class="container">
            <!-- Site Logo -->
            <a href="index.html" class="site-logo">
                <i class="gi gi-flash"></i> <strong>BDS</strong>
            </a>
            <!-- Site Logo -->

            <!-- Site Navigation -->
            <nav>
                <!-- Menu Toggle -->
                <!-- Toggles menu on small screens -->
                <a href="javascript:void(0)" class="btn btn-default site-menu-toggle visible-xs visible-sm">
                    <i class="fa fa-bars"></i>
                </a>
                <!-- END Menu Toggle -->

                <!-- Main Menu -->
                <ul class="site-nav">
                    <!-- Toggles menu on small screens -->
                    <li class="visible-xs visible-sm">
                        <a href="javascript:void(0)" class="site-menu-toggle text-center">
                            <i class="fa fa-times"></i>
                        </a>
                    </li>
                    <!-- END Menu Toggle -->
                    <li class="active">
                        <a href="index.html">首页</a>
                    </li>

                    <li>
                        <a href="#section-1">实时行情</a>
                    </li>

                    <li>
                        <a href="#section-2">产品</a>
                    </li>
                    <li>
                        <a href="#section-3">价格</a>
                    </li>

                    <li>
                        <a href="#section-4">教程</a>
                    </li>
                    <li>
                        <a href="/portal/login.html" class="btn btn-primary">登陆</a>
                    </li>
                    <li>
                        <a href="/portal/signup.html" class="btn btn-success">注册</a>
                    </li>
                </ul>
                <!-- END Main Menu -->
            </nav>
            <!-- END Site Navigation -->
        </div>
    </header>
    <!-- END Site Header -->

    <!-- Intro -->
    <section class="site-section site-section-light site-section-top themed-background-dark">
        <div class="container">
            <h1 class="text-center animation-slideDown"><i class="fa fa-arrow-right"></i> <strong>登陆</strong></h1>
            <h2 class="h3 text-center animation-slideUp">登陆到 对冲平台!</h2>
        </div>
    </section>
    <!-- END Intro -->

    <!-- Log In -->
    <section class="site-content site-section">
        <div class="container">
            <div class="row">
                <div class="col-sm-6 col-sm-offset-3 col-lg-4 col-lg-offset-4 site-block">
                    <!-- Log In Form -->
                    <form id="frm" method="post" onsubmit=" return false"  id="form-log-in" class="form-horizontal">
                        <div class="form-group">
                            <div class="col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><i class="gi gi-envelope"></i></span>
                                    <input type="text" id="username" name="username" class="form-control input-lg" placeholder="username">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><i class="gi gi-asterisk"></i></span>
                                    <input type="password" id="password" name="password" class="form-control input-lg" placeholder="Password">
                                </div>
                            </div>
                        </div>
                        <div class="form-group form-actions">
                            <div class="col-xs-6">
                                <label class="switch switch-primary">
                                    <input type="checkbox" id="rememberme" name="rememberme" checked><span></span>
                                </label>
                                <small>记住我</small>
                            </div>
                            <div class="col-xs-6 text-right">
                                <button type="button" id="loginBtn" class="btn btn-sm btn-primary"><i class="fa fa-arrow-right"></i> 登陆</button>
                            </div>
                        </div>
                        <div class="form-group">

                        </div>
                    </form>
                    <div class="text-center">
                        <a href="javascript:void(0)"><small>忘记密码?</small></a>
                    </div>
                    <!-- END Log In Form -->
                </div>
            </div>
            <hr>
        </div>
    </section>
    <!-- END Log In -->

    <!-- Support Links -->

    <!-- END Support Links -->

    <!-- Footer -->
    <footer class="site-footer site-section">
        <div class="container">
            <!-- Footer Links -->
            <div class="row">
                <div class="col-sm-6 col-md-4">
                    <h4 class="footer-heading">友情链接</h4>
                    <ul class="footer-nav list-inline">
                        <li><a href="javascript:void(0)">Link #1</a></li>
                        <li><a href="javascript:void(0)">Link #2</a></li>
                        <li><a href="javascript:void(0)">Link #3</a></li>
                    </ul>
                </div>

                <div class="col-sm-6 col-md-4">
                    <h4 class="footer-heading">社交</h4>
                    <ul class="footer-nav footer-nav-social list-inline">
                        <li><a href="javascript:void(0)"><i class="fa fa-facebook"></i></a></li>
                        <li><a href="javascript:void(0)"><i class="fa fa-twitter"></i></a></li>
                        <li><a href="javascript:void(0)"><i class="fa fa-google-plus"></i></a></li>
                        <li><a href="javascript:void(0)"><i class="fa fa-dribbble"></i></a></li>
                        <li><a href="javascript:void(0)"><i class="fa fa-rss"></i></a></li>
                    </ul>
                </div>
                <div class="col-sm-6 col-md-4">
                    <h4 class="footer-heading"><span id="year-copy">2017</span> &copy; <a href="http://goo.gl/TDOSuC">BDS UI</a></h4>
                    <ul class="footer-nav list-inline">
                        <li>Crafted with <i class="fa fa-heart text-danger"></i> by <a href="http://goo.gl/vNS3I">bds</a></li>
                    </ul>
                </div>
            </div>
            <!-- END Footer Links -->
        </div>
    </footer>
    <!-- END Footer -->
</div>
<!-- END Page Container -->

<!-- Scroll to top link, initialized in /portal/js/app.js - scrollToTop() -->
<a href="#" id="to-top"><i class="fa fa-angle-up"></i></a>

<!-- jQuery, Bootstrap.js, jQuery plugins and Custom JS code -->
<script src="/portal/js/vendor/jquery.min.js"></script>
<script src="/portal/js/vendor/bootstrap.min.js"></script>
<script src="/portal/js/plugins.js"></script>
<script src="/portal/js/app.js"></script>

<!-- Load and execute javascript code used only in this page -->

<script>
    $(function(){
        $("#loginBtn").click(function(){
            login();
        });





    });

    function login(){
        var uname =  $("#username").val();
        var pwd =  $("#password").val();
        var rememberme =  $("#rememberme").val();
        //$("#frm").submit();
        $.ajax({
            url: 'http://localhost:8088/action/login/submit',
            data: { "username":uname,"password":pwd ,"rememberme":rememberme},
            cache: false,
            //async: false,
            type: "POST",
            dataType: 'jsonp',
            jsonp: "jsonpCallback",
            //其中success_jsonpCallback为自定义名称，与后台保持一致即可
            jsonpCallback: "success_jsonpCallback",
            success: function (result) {
                if(result.code=='suc'){
                    window.location.href="http://localhost:8088/";
                }else{
                    alert(result.msg)
                }
            }
        });


    }
</script>
</body>
</html>